# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=xastir
pkgver=2.2.0
pkgrel=2
pkgdesc="radio amateur mapping, tracking, messaging, weather, and Search & Rescue"
url="https://xastir.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	autoconf
	automake
	curl-dev
	libax25-dev
	libxrender-dev
	libxt-dev
	linux-headers
	motif-dev
	pcre-dev
	shapelib-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Xastir/Xastir/archive/Release-$pkgver.tar.gz
	fix-mutex.patch
	"
builddir="$srcdir"/Xastir-Release-$pkgver
prepare() {
	default_prepare
	./bootstrap.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var

	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d420118e9118ff837d72f17e78563c7e9d39cfcaf05fe12cbf51b50ed36b9307e4b33b0e8a0d056c504a280683c6eb97637e9c4fec3bf1f0d920cb46f6e2cc0b  xastir-2.2.0.tar.gz
2ed800774f2cdbbe1e096e967a896f4e31ba53d5c7ca2c770c74c6ba56967b69a1b56ca940fdcc618853b62284532741ffe3051824deb1be6a98773693508d0c  fix-mutex.patch
"
